<?php

namespace App\Http\Controllers\Student;

use App\Criteria\Student\Relation\StudentRelationBaseQueryCriteria;
use App\Http\Controllers\Controller;
use App\Http\Controllers\CurlRecordMethod;
use App\Http\Requests\Student\StudentRelationBaseRequest;
use App\Http\Requests\StudentRelationCreateRequest;
use App\Http\Requests\StudentRelationUpdateRequest;
use App\Repositories\Student\StudentRelationRepository;
use App\Validators\Student\StudentRelationValidator;
use Illuminate\Support\Facades\Input;


class StudentRelationsController extends Controller
{

    use CurlRecordMethod;

    protected $index_page='student.relation.relationMain';
    protected $add_page='student.relation.relationAdd';
    protected $edit_page='student.relation.relationEdit';

    protected $repository;
    protected $validator;
    protected $request;

    public function __construct(StudentRelationRepository $repository,
                                StudentRelationValidator $validator,
                                StudentRelationBaseRequest $request)
    {
        $this->repository = $repository;
        $this->validator  = $validator;
        $this->request =$request;
    }


    public function getBaseQueryCriteria(){
        return new StudentRelationBaseQueryCriteria;
    }

    public function get_edit_data()
    {
        $student_id=Input::get('student_id');
        return view($this->edit_page,compact('student_id'));
    }

    public function get_add_data()
    {
        $student_id=Input::get('student_id');
        return view($this->add_page,compact('student_id'));
    }
}
